#include "hexstr.h"

static unsigned char	hexstr_hex16charset[] = "0123456789ABCDEF" ;

int bytes2hexstr( unsigned char *bytes , size_t bytes_len , unsigned char *hexstr )
{
	size_t	i ;
	
	for( i = 0 ; i < bytes_len ; i++ )
	{
		*(hexstr++) = hexstr_hex16charset[*(bytes)>>4] ;
		*(hexstr++) = hexstr_hex16charset[*(bytes++)&0x0F] ;
	}
	
	return 0;
}

